<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Add news</title>
<style>
.td1 {
	background-color: #E4EDF9;
}

.td2 {
	background-color: #F1F3F5;
}
</style>
</head>
<body>
<script>
	function checkAndSubmit(){
		var form = document.getElementById("addNewsForm");
		form.submit();
	}
</script>
<script>
	function getObj(obj){
		return document.getElementById(obj)
	};
	function Sendnow(){
		frames['editor'].GetCon();
		var form = document.getElementById("addNewsForm");
		if ( form.newsTypeId.value = ""){
			alert("必须输入新闻类别,如果新闻类别没有，请在新闻类别管理编辑!");
			form.newsTypeId.focus();
			return false;
		}
		form.submit();
	/*	alert($("content").value);*/ 
	};
	function checkAndSubmit(){
		var form = document.getElementById("addNewsForm");
		form.submit();
	}
</script>
<div align="center">新增新闻</div>
<form method="post" action="addNews.action" id="addNewsForm">
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF" align="center">
	<tr>
		<td class="td1" width="100">新闻类别:</td>
		<td class="td1"><s:select list="newsTypeList"
			listValue="typeName" listKey="id" name="newsTypeId" id="newsTypeId">
		</s:select></td>
	</tr>
	<tr>
		<td class="td2">标题:</td>
		<td class="td2"><input type="text" name="title" id="title" size="80"  /></td>
	</tr>
	<tr>
		<td class="td1">概要:</td>
		<td class="td1"><input type="text" name="summary" id="summary" size="80"  /></td>
	</tr>
	<tr>
		<td class="td2">内容:</td>
		<td class="td2">
			<%--
			<input type="text" name="content" id="content" />
			 --%>
			<textarea id='content'  name='content' style='display:none'><s:property value="detailMsg.detailMsg"/></textarea>
			<iframe name='editor' src='edit/edit.action?V=content&T=2&A=1&uploadFolder=<%=com.windfone.common.Constant.UPLOAD_NEWS %>' frameBorder='0' marginHeight='0' marginWidth='0' scrolling='no' style='height:250px;width:640px'></iframe>
		</td>
	</tr>

	<tr>

		<td colspan="2" class="td1"><input type="button" value="Save"
			onclick="Sendnow()" />&nbsp; <input type="button"
			value="reset" />&nbsp; <input type="button" value="返回"
			onclick="javascript:window.history.back();" /></td>
</table>
</form>
</body>
</html>
